<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Picture-Manager: Rectangle Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Picture-Manager
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.2 -->
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('class_rectangle.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="class_rectangle-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">Rectangle Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div>  </div>
</div><!--header-->
<div class="contents">

<p>Describes a <a class="el" href="class_rectangle.html" title="Describes a Rectangle (holds its dimensions and gets position from Shape)">Rectangle</a> (holds its dimensions and gets position from <a class="el" href="class_shape.html" title="Describes a Shape (holds position and color of the shape)">Shape</a>)  
 <a href="class_rectangle.html#details">More...</a></p>

<p><code>#include &lt;Rectangle.h&gt;</code></p>
<div class="dynheader">
Inheritance diagram for Rectangle:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_rectangle.png" usemap="#Rectangle_map" alt=""/>
  <map id="Rectangle_map" name="Rectangle_map">
<area href="class_shape.html" title="Describes a Shape (holds position and color of the shape)" alt="Shape" shape="rect" coords="58,56,165,80"/>
<area href="class_object.html" title="Common Baseclass for all other classes." alt="Object" shape="rect" coords="58,0,165,24"/>
<area href="class_filled_rectangle.html" title="Describes a filled rectangle." alt="FilledRectangle" shape="rect" coords="0,168,107,192"/>
<area href="class_transp_rectangle.html" title="Describes a transparent rectangle." alt="TranspRectangle" shape="rect" coords="117,168,224,192"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a5406b289aaf147589cfa5c78e1af6159"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_rectangle.html#a5406b289aaf147589cfa5c78e1af6159">Rectangle</a> (<a class="el" href="struct_t_position.html">TPosition</a> const &amp;pos, <a class="el" href="struct_t_size.html">TSize</a> const &amp;size, std::string const &amp;color)</td></tr>
<tr class="memdesc:a5406b289aaf147589cfa5c78e1af6159"><td class="mdescLeft">&#160;</td><td class="mdescRight">CTor of <a class="el" href="class_rectangle.html" title="Describes a Rectangle (holds its dimensions and gets position from Shape)">Rectangle</a>.  <a href="#a5406b289aaf147589cfa5c78e1af6159"></a><br/></td></tr>
<tr class="separator:a5406b289aaf147589cfa5c78e1af6159"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acaa2bbc0e5c831e0e596b75e0f5a1644"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_rectangle.html#acaa2bbc0e5c831e0e596b75e0f5a1644">WriteShape</a> (std::ostream &amp;stream)</td></tr>
<tr class="memdesc:acaa2bbc0e5c831e0e596b75e0f5a1644"><td class="mdescLeft">&#160;</td><td class="mdescRight">Write a circle to ostream.  <a href="#acaa2bbc0e5c831e0e596b75e0f5a1644"></a><br/></td></tr>
<tr class="separator:acaa2bbc0e5c831e0e596b75e0f5a1644"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_class_shape"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_class_shape')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="class_shape.html">Shape</a></td></tr>
<tr class="memitem:ac3b9fc48965274893f25b18aa14ba665 inherit pub_methods_class_shape"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_shape.html#ac3b9fc48965274893f25b18aa14ba665">~Shape</a> ()</td></tr>
<tr class="memdesc:ac3b9fc48965274893f25b18aa14ba665 inherit pub_methods_class_shape"><td class="mdescLeft">&#160;</td><td class="mdescRight">DTor of <a class="el" href="class_shape.html" title="Describes a Shape (holds position and color of the shape)">Shape</a>.  <a href="#ac3b9fc48965274893f25b18aa14ba665"></a><br/></td></tr>
<tr class="separator:ac3b9fc48965274893f25b18aa14ba665 inherit pub_methods_class_shape"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_class_object"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_class_object')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="class_object.html">Object</a></td></tr>
<tr class="memitem:aa3e791419d84c4c346ef9499513b8e00 inherit pub_methods_class_object"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_object.html#aa3e791419d84c4c346ef9499513b8e00">~Object</a> ()</td></tr>
<tr class="memdesc:aa3e791419d84c4c346ef9499513b8e00 inherit pub_methods_class_object"><td class="mdescLeft">&#160;</td><td class="mdescRight">DTor of the <a class="el" href="class_object.html" title="Common Baseclass for all other classes.">Object</a> class.  <a href="#aa3e791419d84c4c346ef9499513b8e00"></a><br/></td></tr>
<tr class="separator:aa3e791419d84c4c346ef9499513b8e00 inherit pub_methods_class_object"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a1119c1a7cff702fc644516b3f2464ef8"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_rectangle.html#a1119c1a7cff702fc644516b3f2464ef8">DoWrite</a> (std::ostream &amp;stream)=0</td></tr>
<tr class="memdesc:a1119c1a7cff702fc644516b3f2464ef8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Write a rectangle to ostream.  <a href="#a1119c1a7cff702fc644516b3f2464ef8"></a><br/></td></tr>
<tr class="separator:a1119c1a7cff702fc644516b3f2464ef8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pro_methods_class_shape"><td colspan="2" onclick="javascript:toggleInherit('pro_methods_class_shape')"><img src="closed.png" alt="-"/>&#160;Protected Member Functions inherited from <a class="el" href="class_shape.html">Shape</a></td></tr>
<tr class="memitem:a5f77c7de894b0421ea27a82732f3aaf4 inherit pro_methods_class_shape"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_shape.html#a5f77c7de894b0421ea27a82732f3aaf4">Shape</a> (<a class="el" href="struct_t_position.html">TPosition</a> const &amp;pos, std::string const &amp;color)</td></tr>
<tr class="memdesc:a5f77c7de894b0421ea27a82732f3aaf4 inherit pro_methods_class_shape"><td class="mdescLeft">&#160;</td><td class="mdescRight">CTor of <a class="el" href="class_shape.html" title="Describes a Shape (holds position and color of the shape)">Shape</a>.  <a href="#a5f77c7de894b0421ea27a82732f3aaf4"></a><br/></td></tr>
<tr class="separator:a5f77c7de894b0421ea27a82732f3aaf4 inherit pro_methods_class_shape"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a41af397bbbb6e3fefe657d26e253389b"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_rectangle.html#a41af397bbbb6e3fefe657d26e253389b">mHeight</a></td></tr>
<tr class="memdesc:a41af397bbbb6e3fefe657d26e253389b"><td class="mdescLeft">&#160;</td><td class="mdescRight">the height of a rectangle  <a href="#a41af397bbbb6e3fefe657d26e253389b"></a><br/></td></tr>
<tr class="separator:a41af397bbbb6e3fefe657d26e253389b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5fca882e2904cd27d5432e86dac6a879"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_rectangle.html#a5fca882e2904cd27d5432e86dac6a879">mWidth</a></td></tr>
<tr class="memdesc:a5fca882e2904cd27d5432e86dac6a879"><td class="mdescLeft">&#160;</td><td class="mdescRight">the width of a rectangle  <a href="#a5fca882e2904cd27d5432e86dac6a879"></a><br/></td></tr>
<tr class="separator:a5fca882e2904cd27d5432e86dac6a879"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pro_attribs_class_shape"><td colspan="2" onclick="javascript:toggleInherit('pro_attribs_class_shape')"><img src="closed.png" alt="-"/>&#160;Protected Attributes inherited from <a class="el" href="class_shape.html">Shape</a></td></tr>
<tr class="memitem:ad61a3f311664c04f6a5eb940d678084b inherit pro_attribs_class_shape"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_shape.html#ad61a3f311664c04f6a5eb940d678084b">mColor</a></td></tr>
<tr class="memdesc:ad61a3f311664c04f6a5eb940d678084b inherit pro_attribs_class_shape"><td class="mdescLeft">&#160;</td><td class="mdescRight">color of a shape  <a href="#ad61a3f311664c04f6a5eb940d678084b"></a><br/></td></tr>
<tr class="separator:ad61a3f311664c04f6a5eb940d678084b inherit pro_attribs_class_shape"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaea18efc9cdf76b1df04e505ace9ea51 inherit pro_attribs_class_shape"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_shape.html#aaea18efc9cdf76b1df04e505ace9ea51">mX</a></td></tr>
<tr class="memdesc:aaea18efc9cdf76b1df04e505ace9ea51 inherit pro_attribs_class_shape"><td class="mdescLeft">&#160;</td><td class="mdescRight">x-position of a shape  <a href="#aaea18efc9cdf76b1df04e505ace9ea51"></a><br/></td></tr>
<tr class="separator:aaea18efc9cdf76b1df04e505ace9ea51 inherit pro_attribs_class_shape"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abe2932b5e986e890f9245476733c7198 inherit pro_attribs_class_shape"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_shape.html#abe2932b5e986e890f9245476733c7198">mY</a></td></tr>
<tr class="memdesc:abe2932b5e986e890f9245476733c7198 inherit pro_attribs_class_shape"><td class="mdescLeft">&#160;</td><td class="mdescRight">y-position of a shape  <a href="#abe2932b5e986e890f9245476733c7198"></a><br/></td></tr>
<tr class="separator:abe2932b5e986e890f9245476733c7198 inherit pro_attribs_class_shape"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pub_static_methods_class_object"><td colspan="2" onclick="javascript:toggleInherit('pub_static_methods_class_object')"><img src="closed.png" alt="-"/>&#160;Static Public Member Functions inherited from <a class="el" href="class_object.html">Object</a></td></tr>
<tr class="memitem:a86a84ed2d1207e5f8827165ac2941106 inherit pub_static_methods_class_object"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_object.html#a86a84ed2d1207e5f8827165ac2941106">deleteObject</a> (<a class="el" href="class_object.html">Object</a> *obj)</td></tr>
<tr class="memdesc:a86a84ed2d1207e5f8827165ac2941106 inherit pub_static_methods_class_object"><td class="mdescLeft">&#160;</td><td class="mdescRight">Frees the memory used by obj.  <a href="#a86a84ed2d1207e5f8827165ac2941106"></a><br/></td></tr>
<tr class="separator:a86a84ed2d1207e5f8827165ac2941106 inherit pub_static_methods_class_object"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Describes a <a class="el" href="class_rectangle.html" title="Describes a Rectangle (holds its dimensions and gets position from Shape)">Rectangle</a> (holds its dimensions and gets position from <a class="el" href="class_shape.html" title="Describes a Shape (holds position and color of the shape)">Shape</a>) </p>
<p>The class <a class="el" href="class_rectangle.html" title="Describes a Rectangle (holds its dimensions and gets position from Shape)">Rectangle</a> holds information of a <a class="el" href="class_rectangle.html" title="Describes a Rectangle (holds its dimensions and gets position from Shape)">Rectangle</a> (width and height) and gets its position from the class <a class="el" href="class_shape.html" title="Describes a Shape (holds position and color of the shape)">Shape</a>. Writes a rectangle to ostream and delegates output function (DoWrite) to filled and transparent rectangles. (Template Method) </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a5406b289aaf147589cfa5c78e1af6159"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Rectangle::Rectangle </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_t_position.html">TPosition</a> const &amp;&#160;</td>
          <td class="paramname"><em>pos</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_t_size.html">TSize</a> const &amp;&#160;</td>
          <td class="paramname"><em>size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string const &amp;&#160;</td>
          <td class="paramname"><em>color</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>CTor of <a class="el" href="class_rectangle.html" title="Describes a Rectangle (holds its dimensions and gets position from Shape)">Rectangle</a>. </p>
<p>Constructs a rectangle by initializing its position, size (width and height) and color. Position and color are set in <a class="el" href="class_shape.html" title="Describes a Shape (holds position and color of the shape)">Shape</a> (<a class="el" href="class_shape.html" title="Describes a Shape (holds position and color of the shape)">Shape</a> constructor is called). </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pos</td><td>The position of the rectangle on a picture. </td></tr>
    <tr><td class="paramname">size</td><td>The dimensions of a rectangle. </td></tr>
    <tr><td class="paramname">color</td><td>The color a rectangle has. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a1119c1a7cff702fc644516b3f2464ef8"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void Rectangle::DoWrite </td>
          <td>(</td>
          <td class="paramtype">std::ostream &amp;&#160;</td>
          <td class="paramname"><em>stream</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Write a rectangle to ostream. </p>
<p>Write a rectangle (filled or transparent) to ostream. (abstract method) </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">stream</td><td>The stream where output is written to. </td></tr>
  </table>
  </dd>
</dl>

<p>Implemented in <a class="el" href="class_filled_rectangle.html#a85934654e069ecb07c2d5022346f5d0c">FilledRectangle</a>, and <a class="el" href="class_transp_rectangle.html#a4fe2aa3dca9b1c8b15ebe6752494f34b">TranspRectangle</a>.</p>

</div>
</div>
<a class="anchor" id="acaa2bbc0e5c831e0e596b75e0f5a1644"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Rectangle::WriteShape </td>
          <td>(</td>
          <td class="paramtype">std::ostream &amp;&#160;</td>
          <td class="paramname"><em>stream</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Write a circle to ostream. </p>
<p>Writes a circle to ostream by delegating to the function DoWrite, writing a filled or transparent circle. It is implemented in class <a class="el" href="class_circle.html" title="Describes a Circle (holds its radius and gets position from Shape)">Circle</a> and <a class="el" href="class_rectangle.html" title="Describes a Rectangle (holds its dimensions and gets position from Shape)">Rectangle</a>. (template method) </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">stream</td><td>The stream where output is written to. </td></tr>
  </table>
  </dd>
</dl>

<p>Implements <a class="el" href="class_shape.html#a997febc1ea1ad30dfa67eaba85156365">Shape</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="a41af397bbbb6e3fefe657d26e253389b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">float Rectangle::mHeight</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>the height of a rectangle </p>
<p>mHeight describes the height (y-value) of a rectangle </p>

</div>
</div>
<a class="anchor" id="a5fca882e2904cd27d5432e86dac6a879"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">float Rectangle::mWidth</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>the width of a rectangle </p>
<p>mWidth describes the width (x-value) of a rectangle </p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="class_rectangle.html">Rectangle</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.2 </li>
  </ul>
</div>
</body>
</html>
